import { createApp } from 'vue'
import App from './App.vue'
import vant from 'vant'
import 'vant/lib/index.css'
import axios from 'axios'//引入axios发起网络请求
import router from './router'//路由导航
import { createPinia } from 'pinia'//引入状态管理
import ElementPlus from 'element-plus'//UI框架
import './assets/main.css'//全局样式（公共）
import wechatTitle from 'vue-wechat-title'//引入VueWechatTitle
import 'element-plus/dist/index.css'//UI框架样式
import * as ElementPlusIconsVue from '@element-plus/icons-vue'//图标
import 'amfe-flexible'//自适应

// vant


//粒子特效组件


/* 全局组件 */
// import headerDemo  from '@/components/headerDemo.vue'

/* 图标 */
import '@/assets/icons/iconfont.js'


/* 全局变量 */
import globalVar from '@/utils/globalVar.js'
/* 全局请求参数 */
import RequestService from '@/api/reGet.js'
/* 状态管理 */
// import {useAuthStore} from '@/stores/index'
// const auth = useAuthStore()

const pinia = createPinia()

const app = createApp(App)
app.use(vant)
app.use(pinia)
app.mixin(globalVar)
// app.component('headerDemo', headerDemo)//注册全局组件
app.config.globalProperties.$reGet = RequestService;// 注册全局属性
app.config.globalProperties.$axios = axios//axios配置
app.config.globalProperties.$localStorage = localStorage;//调用本地缓存
app.use(ElementPlus)//使用UI
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}//UI配置
app.use(router) //引入vue-router
app.use(wechatTitle);
app.mount('#app')